IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SrvrInstncMachine]') AND type in (N'U'))
BEGIN
     DROP TABLE [dbo].[SrvrInstncMachine]
END
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[SrvrInstncMachine](
     [SrvrInstncId]       [int]      NOT NULL,
     [MachineId]          [int]      NOT NULL,
     [PackageExecutionId] [bigint]   NOT NULL,
     [LastModDt]          [datetime] NOT NULL CONSTRAINT [DF_SrvrInstncMachine_LastModDt] DEFAULT (getdate()),
     CONSTRAINT [PK_SrvrInstncMachine] PRIMARY KEY CLUSTERED ( [SrvrInstncId] ASC, [MachineId] ASC )
) ON [PRIMARY]
GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Unique Identifier of a particular Database Server Instance.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncMachine', @level2type=N'COLUMN',@level2name=N'SrvrInstncId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Unique Identifier of a particular server machine.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncMachine', @level2type=N'COLUMN',@level2name=N'MachineId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Execution Id of the package that populated or updated this row (usually by SSIS).' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncMachine', @level2type=N'COLUMN',@level2name=N'PackageExecutionId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The last date/time the record was changed.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncMachine', @level2type=N'COLUMN',@level2name=N'LastModDt'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Server instance machines.  Contains the linkake between server instances and server machines.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncMachine'
GO
